//
//  YCPowerTableViewCell.m
//  LOLBox
//
//  Created by mac on 15-4-1.
//  Copyright (c) 2015年 Honey. All rights reserved.
//

#import "YCPowerTableViewCell.h"
#import "YCPowerModel.h"

@interface YCPowerTableViewCell ()
@property (weak, nonatomic) IBOutlet UIImageView *imgView;
@property (weak, nonatomic) IBOutlet UILabel *level;
@property (weak, nonatomic) IBOutlet UILabel *totalScore;
@property (weak, nonatomic) IBOutlet UILabel *good;
@property (weak, nonatomic) IBOutlet UILabel *normal;
@property (weak, nonatomic) IBOutlet UILabel *name;
@property (weak, nonatomic) IBOutlet UILabel *sn;
@property (weak, nonatomic) IBOutlet UILabel *baifen;
@property (weak, nonatomic) IBOutlet UIProgressView *progress;


@end

@implementation YCPowerTableViewCell

- (void)awakeFromNib
{
    // Initialization code
    
}

- (void)fillCellWithModel:(YCPowerModel *)model
{
    self.level.layer.cornerRadius = 10;
    self.level.clipsToBounds = YES;
    
    NSInteger cnt = arc4random() % 100;
    NSString *s = @"%";
    self.baifen.text = [NSString stringWithFormat:@"%d%@",cnt,s];
    
    self.progress.progress = (CGFloat) cnt / 100;
    
    self.level.text = [model.level stringValue];
    self.totalScore.text = [model.zdlSorce stringValue];
    self.name.text = model.name;
    self.good.text = [model.good stringValue];
    self.sn.text = [NSString stringWithFormat:@"%@ %@",model.sn,model.server];
    
    self.normal.text = model.zucheng_1;
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
